﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="clk_shoulilist.aspx.cs" Inherits="Default3" Title="待受理的计划单列表" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">

        .style7
        {
            font-size: small;
            text-align: left;
        }
        .style21
        {
            font-size: small;
        }
                    
        .style11
        {
            font-size: small;
            text-align: left;
        }
        .auto-style1 {
            width: 900px;
        }
        </style>
</head>
<body background="images/login-bg.jpg">
    <form id="form1" runat="server">
    <div style="text-align: center">
    
    <div class="style7">
    
        <span class="style7">当前位置：</span><asp:HyperLink ID="HyperLink1" runat="server" 
            CssClass="style7" NavigateUrl="~/index.aspx" style="color: #000000" 
            ToolTip="点击返回主页面">主页面</asp:HyperLink>
        <span class="style7">→ 待受理的计划单列表</span><br class="style7" />
        <br /></div>
        <br />
        <br />
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <b>
        <asp:SqlDataSource ID="SqlDataSource_chejian" runat="server" 
            ConnectionString="<%$ ConnectionStrings:xxnewsConnectionString %>" 
            
            SelectCommand="SELECT [ch_pwname] FROM [siteman] WHERE (([bm_leibie] LIKE '%' + @bm_leibie + '%') AND ([ch_pwname] LIKE '%' + @ch_pwname2 + '%')) ORDER BY [ch_px]">
            <SelectParameters>
                <asp:Parameter DefaultValue="车间" Name="bm_leibie" Type="String" />
                <asp:Parameter DefaultValue="车间" Name="ch_pwname2" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource_banzu" runat="server" 
            ConnectionString="<%$ ConnectionStrings:xxnewsConnectionString %>" 
            SelectCommand="SELECT [ch_pwname] FROM [siteman] WHERE (([bm_leibie] = @bm_leibie) AND ([ch_pwname] &lt;&gt; @ch_pwname)) ORDER BY [ch_px]">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList_sscj" Name="bm_leibie" 
                    PropertyName="SelectedValue" Type="String" />
                <asp:ControlParameter ControlID="DropDownList_sscj" Name="ch_pwname" 
                    PropertyName="SelectedValue" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    
        <table class="auto-style1">
            <tr>
                <td align="right"><b><span class="style21">类别</span><asp:DropDownList ID="DropDownList_lei" runat="server" CssClass="style21">
                                    <asp:ListItem Selected="True">请选择</asp:ListItem>
            <asp:ListItem>接触网</asp:ListItem>
            <asp:ListItem>电力配电</asp:ListItem>
            <asp:ListItem>变电</asp:ListItem>
            <asp:ListItem>工具配件</asp:ListItem>
            <asp:ListItem>劳保用品</asp:ListItem>
            <asp:ListItem>汽轨车辆</asp:ListItem>
            <asp:ListItem>通用物资</asp:ListItem>
                                </asp:DropDownList>
                                <span class="style21">&nbsp;&nbsp;日期</span><asp:DropDownList ID="nian" runat="server" AppendDataBoundItems="True" CssClass="style21">
                                    <asp:ListItem>请选择</asp:ListItem>
                                </asp:DropDownList>
                                年<asp:DropDownList ID="yue" runat="server" AppendDataBoundItems="True" CssClass="style21">
                                    <asp:ListItem>请选择</asp:ListItem>
                                </asp:DropDownList>
                                <span class="style21">月</span></b></td>
                <td>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <b><span class="style21">车间</span><asp:DropDownList ID="DropDownList_sscj" runat="server" AppendDataBoundItems="True" AutoPostBack="True" CssClass="style11" DataSourceID="SqlDataSource_chejian" DataTextField="ch_pwname" DataValueField="ch_pwname" onselectedindexchanged="DropDownList_sscj_SelectedIndexChanged">
                                <asp:ListItem>请选择</asp:ListItem>
                            </asp:DropDownList>
                            <span class="style21">班组</span><asp:DropDownList ID="DropDownList_zrbz" runat="server" AppendDataBoundItems="True" AutoPostBack="True" CssClass="style11" DataSourceID="SqlDataSource_banzu" DataTextField="ch_pwname" DataValueField="ch_pwname">
                                <asp:ListItem>请选择</asp:ListItem>
                            </asp:DropDownList>
                            &nbsp; </b>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
                <td align="left"><b>
                    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="查找" />
                    </b>
    
                </td>
            </tr>
        </table>
        <br />
        待受理的计划单列表<br />
        <br />
        <asp:GridView ID="GridView1" runat="server" 
        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="c_id" 
        DataSourceID="SqlDataSource1" EmptyDataText="没有待受理的计划单" 
        EnableModelValidation="True" ForeColor="#333333" GridLines="None" 
        style="text-align: center; font-size: small" 
            onrowdatabound="GridView1_RowDataBound" PageSize="30" Font-Bold="False">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:CommandField ShowDeleteButton="True" HeaderText="删除" Visible="False" />
                <asp:TemplateField HeaderText="序号"></asp:TemplateField>
                <asp:BoundField DataField="c_id" HeaderText="编号" InsertVisible="False" 
                ReadOnly="True" SortExpression="c_id" />
                <asp:BoundField DataField="lei" HeaderText="类别" SortExpression="lei" />
                <asp:BoundField DataField="chejian" HeaderText="所属车间" 
                SortExpression="chejian" />
                <asp:BoundField DataField="banzu" HeaderText="班组" SortExpression="banzu" />
                <asp:BoundField DataField="nian" HeaderText="年" SortExpression="nian" />
                <asp:BoundField DataField="yue" HeaderText="月" SortExpression="yue" />
                <asp:BoundField DataField="addname" HeaderText="提报人" SortExpression="addname" />
                <asp:BoundField DataField="addtime" HeaderText="提报时间" 
                SortExpression="addtime" />
                <asp:BoundField DataField="chejianname" HeaderText="车间审批" 
                    SortExpression="chejianname" />
                <asp:BoundField DataField="chejiantime" HeaderText="车间审批时间" 
                    SortExpression="chejiantime" />
                <asp:BoundField DataField="duanname" HeaderText="段审批" 
                    SortExpression="duanname" />
                <asp:BoundField DataField="duantime" HeaderText="段审批时间" 
                    SortExpression="duantime" />
                <asp:BoundField DataField="zt" HeaderText="zt" SortExpression="zt" 
                Visible="False" />
                <asp:BoundField DataField="liezhi" HeaderText="列支情况" 
                    SortExpression="liezhi" />
                <asp:HyperLinkField DataNavigateUrlFields="c_id" 
                DataNavigateUrlFormatString="clk_shouli.aspx?id={0}" HeaderText="查看详细计划" 
                Text="查看详细计划" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:xxnewsConnectionString %>" 
            DeleteCommand="DELETE FROM [cailiaoguanli] WHERE [c_id] = @c_id" 
            InsertCommand="INSERT INTO [cailiaoguanli] ([lei], [chejian], [banzu], [nian], [yue], [addname], [addtime], [addip], [chejianname], [chejiantime], [chejianip], [duanname], [duantime], [duanip], [cailiaoname], [cailiaotime], [cailiaoip], [lingdaoname], [lingdaotime], [lingdaoip], [zt]) VALUES (@lei, @chejian, @banzu, @nian, @yue, @addname, @addtime, @addip, @chejianname, @chejiantime, @chejianip, @duanname, @duantime, @duanip, @cailiaoname, @cailiaotime, @cailiaoip, @lingdaoname, @lingdaotime, @lingdaoip, @zt)" 
            SelectCommand="SELECT * FROM [cailiaoguanli] WHERE ([zt] = @zt) and nian=@nian and yue=@yue ORDER BY [addtime] desc" 
            
            
            UpdateCommand="UPDATE [cailiaoguanli] SET [lei] = @lei, [chejian] = @chejian, [banzu] = @banzu, [nian] = @nian, [yue] = @yue, [addname] = @addname, [addtime] = @addtime, [addip] = @addip, [chejianname] = @chejianname, [chejiantime] = @chejiantime, [chejianip] = @chejianip, [duanname] = @duanname, [duantime] = @duantime, [duanip] = @duanip, [cailiaoname] = @cailiaoname, [cailiaotime] = @cailiaotime, [cailiaoip] = @cailiaoip, [lingdaoname] = @lingdaoname, [lingdaotime] = @lingdaotime, [lingdaoip] = @lingdaoip, [zt] = @zt WHERE [c_id] = @c_id">
            <DeleteParameters>
                <asp:Parameter Name="c_id" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="lei" Type="String" />
                <asp:Parameter Name="chejian" Type="String" />
                <asp:Parameter Name="banzu" Type="String" />
                <asp:Parameter Name="nian" Type="String" />
                <asp:Parameter Name="yue" Type="String" />
                <asp:Parameter Name="addname" Type="String" />
                <asp:Parameter Name="addtime" Type="DateTime" />
                <asp:Parameter Name="addip" Type="String" />
                <asp:Parameter Name="chejianname" Type="String" />
                <asp:Parameter Name="chejiantime" Type="DateTime" />
                <asp:Parameter Name="chejianip" Type="String" />
                <asp:Parameter Name="duanname" Type="String" />
                <asp:Parameter Name="duantime" Type="DateTime" />
                <asp:Parameter Name="duanip" Type="String" />
                <asp:Parameter Name="cailiaoname" Type="String" />
                <asp:Parameter Name="cailiaotime" Type="DateTime" />
                <asp:Parameter Name="cailiaoip" Type="String" />
                <asp:Parameter Name="lingdaoname" Type="String" />
                <asp:Parameter Name="lingdaotime" Type="DateTime" />
                <asp:Parameter Name="lingdaoip" Type="String" />
                <asp:Parameter Name="zt" Type="String" />
            </InsertParameters>
            <SelectParameters>
                <asp:Parameter DefaultValue="4" Name="zt" Type="String" />
                <asp:ControlParameter ControlID="nian" DefaultValue="" Name="nian" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="yue" Name="yue" PropertyName="SelectedValue" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="lei" Type="String" />
                <asp:Parameter Name="chejian" Type="String" />
                <asp:Parameter Name="banzu" Type="String" />
                <asp:Parameter Name="nian" Type="String" />
                <asp:Parameter Name="yue" Type="String" />
                <asp:Parameter Name="addname" Type="String" />
                <asp:Parameter Name="addtime" Type="DateTime" />
                <asp:Parameter Name="addip" Type="String" />
                <asp:Parameter Name="chejianname" Type="String" />
                <asp:Parameter Name="chejiantime" Type="DateTime" />
                <asp:Parameter Name="chejianip" Type="String" />
                <asp:Parameter Name="duanname" Type="String" />
                <asp:Parameter Name="duantime" Type="DateTime" />
                <asp:Parameter Name="duanip" Type="String" />
                <asp:Parameter Name="cailiaoname" Type="String" />
                <asp:Parameter Name="cailiaotime" Type="DateTime" />
                <asp:Parameter Name="cailiaoip" Type="String" />
                <asp:Parameter Name="lingdaoname" Type="String" />
                <asp:Parameter Name="lingdaotime" Type="DateTime" />
                <asp:Parameter Name="lingdaoip" Type="String" />
                <asp:Parameter Name="zt" Type="String" />
                <asp:Parameter Name="c_id" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <br /></b>
    
    </div>
    </form>
    <p class="style21" style="TEXT-ALIGN: center">
        &nbsp;<br />
        &nbsp;安康供电段信息中心制作 2015</p>
</body>
</html>
